<template>
	<view>
		<view class="header status_bar" :class="scrrol == true ? 'scrrolHeader' : ''">
			<view class="back iconfont icon-xiangzuo1" @tap="backPage"></view>
			<view class="text" :class="scrrol == true ? 'scrrolHeader' : ''">{{pageTitle}}</view>
		</view>
		<view class="bg_box">
			<image class="bg01" :src="getImgSrc('/static/bg02.png')" mode="widthFix"></image>
			<view class="bg_content">
				<view class="content_box">
					<rich-text class="fwb" :nodes="strings"></rich-text>

				</view>

			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				scrrol: false,
				info: '',
				strings: '',
				type: '',
				pageTitle: '',
			};
		},
		onLoad(options) {
			console.log(options)
			let that = this;
			that.type = options.type;
			that.pageTitle = options.title;
			that.loadData();
		},
		methods: {
			backPage() {
				uni.navigateBack({});
			},
			gotopage(e) {
				let url = e.currentTarget.dataset.url;
				uni.navigateTo({
					url: url
				});
			},
			loadData() {
				let that = this;
				that.Net._get('index/notice_detail',{type:that.type}, res => {
					if(res.code == 200){
						that.strings = res.data.content;
					}
				});
			},
		}
	};
</script>

<style>
	.header {
		background-color: transparent !important;
	}

	.header .text {
		background-color: transparent !important;
		color: #333 !important;
	}
	
	.header .back{
		color: #333 !important;
	}

	.scrrolHeader {
		background-color: #F9E9E3 !important;
	}

	.bg_box {
		width: 100%;
		position: relative;
	}

	.bg_box .bg01 {
		width: 100%;
	}

	.bg_box .bg_content {
		width: 100%;
		position: absolute;
		left: calc(50% - 46%);
		top: calc(13.5vw + var(--status-bar-height));
		z-index: 98;
	}

	.content_box {
		width: 92%;
		margin: auto;
		font-size: 3.5vw;
		line-height: 6vw;
	}

	.content_box .fwb {
		width: 92%;
		margin: auto;
	}
</style>